<?php
require_once 'index1.php';
require_once 'class/staff.php';
if(isset($_SESSION['staff'])){
    $staff = unserialize($_SESSION['staff']);
    $steffTemp = new staff($staff->getEmail(),$staff->getPW());
    $feedback =$steffTemp->checkInitial();
    echo "<div class='logStatuebar'><span class='welcome'> welcome staff</span>";
    echo "<div class=logout><a href='logout.php?attempt'>Log Out</a></div>";
    echo "<div class='userName'>" . $steffTemp->getEmail() . "</div></div>";
    if(!$feedback){
      header("refresh:2; url=http://localhost:8080/staffinitial.php");
    }
}
else{
    echo 'you need to login staff first';
    header("refresh:2; url=http://localhost:8080");
}

require_once 'index2.php';
?>
